﻿namespace MediatorPattern.DemoTwo
{
    /// <summary>
    /// 採購管理類
    /// </summary>
    public class Purchase : AbstractColleague
    {
        public Purchase(AbstractMediator _mediator) : base(_mediator)
        {
        }

        /// <summary>
        /// 採購IBM電腦
        /// </summary>
        /// <param name="number"></param>
        public void buyIBMComputer(int number)
        {
            mediator.execute("purchase.buy", number);
        }


        /// <summary>
        /// 不再採購IBM電腦
        /// </summary>
        /// <returns></returns>
        public string refuseBuyIBM()
        {
            return "DON'T REFUSE BUY IBM";
        }
    }
}